
import set from '@dfeidao/atom-web/local/set';

import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';

export default async function a001(fd: IFeidaoAiBrowserComponent, args: { currentTarget: HTMLElement }) {
	const target_node = args.currentTarget as HTMLElement;
	const id = target_node.getAttribute('data-feidao-id');
	// fd.data.w_id = id;
	set(fd, 'w_id', id);
	// debugger;
	const items = fd.data.node.querySelectorAll<HTMLInputElement>('[data-alert_list]');
	Array.from(items).forEach((i) => {
		i.classList.remove('bg-c');
	});
	args.currentTarget.closest('[data-alert_list]').classList.add('bg-c');
}
